<template>
	<view>
		<view class="frame">
		<u-navbar :title="ftitle" @rightClick="rightClick" :autoBack="true"></u-navbar>
			<view class="header">
				<view class="essay_cent">
					<jyf-parser :html="content" ref="article" :tag-style="tagStyle"></jyf-parser>
				</view>
				<view style="width: 750rpx;height: 200rpx;"></view>
			</view>
		</view>
	</view>
</template>

<script>
	import jyfParser from "@/components/jyf-parser/jyf-parser";
	export default {
		components: {
			jyfParser
		},
		data() {
			return {
				content: '', //富文本
				tagStyle: {
					img: 'display: block;width: 100%!important;height:auto!important;',
					p: 'margin-bottom: 10rpx;line-height: 50rpx;padding: 0 20rpx;'
				},
				ftitle: '关于我们',
				count: 5,
				value: 4,
			}
		},
		onLoad() {
			//查询关于我们
			this.getAbout();
		},
		methods: {
			//查询用户协议
			async getAbout() {
				let data = await this.$api.getfyxieyi();
				const regex = new RegExp('<img', 'gi');
				var richtext =  data.rows[2].content
				richtext = richtext.replace(/<table[^>]*>/gi,
					'<table cellpadding="0" cellspacing="0" max-width="100%" border="1" style="font-size:24rpx;max-width:100%; text-align:left;text-indent: 0em;line-height:24rpx;">'
				);
				this.content = richtext.replace(regex, `<img style="max-width: 100%;"`);
			},
		}
	}
</script>

<style lang="scss">
	.frame {
		width: 100%;
		min-height: 100vh;
		background: #F5F6F8;
	
		::v-deep .u-status-bar {
			background: rgba(245, 247, 251, 0) !important;
		}
	
		::v-deep .u-navbar__content {
			background: rgba(245, 247, 251, 0) !important;
		}
	
		::v-deep .u-tabs {
			background: rgba(245, 247, 251, 0) !important;
		}
	
		.header {
			width: 100%;
			height: 492rpx;
			background: url('https://arric-1324623811.cos.ap-shanghai.myqcloud.com/hotel_mini/guanyuwomen.png') no-repeat;
			background-size: 100% 100%;
			position: relative;
		}
	}

	.essay_cent {
		width: 95%;
		font-size: 30rpx;
		font-weight: 400;
		letter-spacing: -0.6rpx;
		line-height: 54rpx;
		color: rgba(60, 60, 60, 1);
		position: absolute;
		margin: 200rpx auto ;
		margin-left: 20rpx;

	}

	.me_about_navigationBar_view {
		width: 750rpx;
		height: 140rpx;
		 
		background: rgba(255, 255, 255, 1);
		position: fixed;
		bottom: 0;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;

		.me_about_navigationBar_views {
			width: 316rpx;
			height: 80rpx;
			margin-bottom: 40rpx;
		}

		.me_about_navigationBar_viewss {
			width: 316rpx;
			height: 80rpx;
			margin-left: 14rpx;
			margin-bottom: 40rpx;
		}
	}
</style>